<template>
  <div>
    <Mytou :backgroundColor="'pink'" :color="'black'" />

    <div id="app">
      <Myshangpin v-for="obj in list" :key="obj.id" :goodobj='obj' />
    </div>
    <Mydibu :arr="list" />
  </div>
</template>

<script>
  import Mytou from './components/MyHeader'
  import Mydibu from './components/MyFooter'
  import Myshangpin from './components/MyGoods'
  export default {
    components: {
      Mytou,
      Mydibu,
      Myshangpin
    },
    data() {
      return {
        list: [],
      }
    },
    created() {
      this.$axios({
        url: 'https://www.escook.cn/api/cart'
      }).then(res => {
        this.list = res.data.list
        console.log(res);
      })
    },


  }
</script>

<style>
  #app {
    padding-top: 45px;
    padding-bottom: 50px;
  }
</style>